<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/1 0001
 * Time: 下午 11:38
 */

namespace app\controller;


use app\model\Two;
use think\Container;

class Inject
{

    protected $two;

    public function __construct(Two $two)
    {
        $this->two = $two;
    }

    public function test(){

        //return $this->two->username;
        //bind("two",Two::class);
        //return app("two")->username;
        //return app()['two']->username;
        //return Container::getInstance()['two']->username;
        return Container::getInstance()['app\model\Two']->username;
    }
}